import request from "@/utils/request";

const BaseUrl = '/api/user'


// 获取用户信息
export function getUserInfo(id: any){
    return request({
        url: BaseUrl +  '/info/get',
        method: 'get',
        params:{
            id: id,
        },
    })
}


// 向司机询价
export function quoteToDriver(data: any){
    return request({
        url: BaseUrl +  '/quote/toDriver',
        method: 'post',
        data: data,
    })
}


// 承运商获取运输询价信息
export function toGetDriverQuote(number: any){
    return request({
        url: BaseUrl +  '/get/driverQuote',
        method: 'get',
        params: {
            orderNumber: number,
        }
    })
}


// 承运商报价
export function carriersQuote(data: any){
    return request({
        url: BaseUrl +  '/carriers/quote',
        method: 'post',
        data: data,
    })
}


// 根据订单号获取报价
export function carriersQuoteGetById(number: any){
    return request({
        url: BaseUrl +  '/carriers/quote/getById',
        method: 'get',
        params: {
            orderNumber: number,
        }
    })
}

// 客户下单
export function clientOrderCreate(data: any){
    return request({
        url: BaseUrl +  '/client/order',
        method: 'post',
        data: data,
    })
}

